package com.nanfangzhe.shirodemo.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nanfangzhe.shirodemo.entity.UUserRole;
import com.nanfangzhe.shirodemo.mapper.UUserRoleMapper;
import com.nanfangzhe.shirodemo.service.UUserRoleService;

/**
 * <p>
 * 用户与角色对应表 服务实现类
 * </p>
 *
 * @author nanfangzhe
 * @since 2020-11-25
 */
@Service
public class UUserRoleServiceImpl extends ServiceImpl<UUserRoleMapper, UUserRole> implements UUserRoleService {
	@Autowired
	private UUserRoleMapper dao;
	
	@Override
	public List<UUserRole> getRid(int uid) {
		QueryWrapper<UUserRole> wrapper = new QueryWrapper<UUserRole>();
		wrapper.eq("uid", uid);
		return dao.selectList(wrapper);
	}

}
